<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <link th:href="@{/c/base.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/c/toefl.css}" rel="stylesheet" type="text/css">
    <link rel="stylesheet" th:href="@{/c/bootstrap.min.css}">
    <script type="text/javascript" th:src="@{/j/jquery-2.1.0.js}"></script>
    <script th:src="@{/j/bootstrap.min.js}"></script>
    <script th:src="@{/j/common.js}" type="text/javascript">

    </script>
</head>

<body>
<div class="doc1180">
    <div class="header">
        <div class="logo"><a href="####"><img th:src="@{/i/logo.png}"></a></div>
        <div class="headerUser">
            <ul>
                <li class="headerUserPic"><a href="###"><img src="i/30x30.png"></a></li>
                <li class="headerUserName"><a href="###">用户名ABCDEF</a></li>
                <li class="headerUserNotice">通知<a href="###">14</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="menu">
    <div class="doc1180">
        <div class="menuLink">
            <ul class="fn-clear">
                <li class="active"><a th:href="@{/main}" target="ifr">首页</a></li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        系统管理 <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a th:href="@{/admin/admin-course-activites}" target="ifr">课程活动</a></li>
                        <li><a th:href="@{/admin/admin-website-link}" target="ifr">网站链接</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        用户管理 <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a th:href="@{/admin/admin-teacher}" target="ifr">讲师管理</a></li>
                        <li><a th:href="@{/admin/admin-user}" target="ifr">用户管理</a></li>
                    </ul>
                </li>


                <li><a th:href="@{/admin/admin-toefl-people}" target="ifr">托福人</a></li>
                <li><a th:href="@{/admin/admin-group}" target="ifr">群组聊天</a></li>
                <li><a th:href="@{/admin/admin-open-course}" target="ifr">公开课</a></li>
                <li><a th:href="@{/admin/admin-welfare-castle}" target="ifr">福利城堡</a></li>
            </ul>
        </div>
        <div class="fenxiang">
            <a href="#" class="weibo"><img th:src="@{/i/weibo.png}"></a>
            <a href="#" class="weixin"><img th:src="@{/i/weixin.png}"></a>
        </div>
    </div>
</div>
<iframe id="ifr" name="ifr" th:src="@{/main}" style="width: 99vw;height: 84vh;" frameborder="no"></iframe>
<iframe th:src="@{/footer}" style="width: 99vw;height: 32vh;" frameborder="no"></iframe>


<script type="text/javascript">
    // 计算页面的实际高度，iframe自适应会用到
    function calcPageHeight(doc) {
        var cHeight = Math.max(doc.body.clientHeight, doc.documentElement.clientHeight);
        var sHeight = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight);
        var height = Math.max(doc.body.clientHeight, doc.body.scrollHeight);
        return height
    }

    var ifr = document.getElementById('ifr')
    ifr.onload = function () {
        var inter = window.setInterval(function () {
            var iDoc = ifr.contentDocument || ifr.document
            var height = calcPageHeight(iDoc)
            ifr.style.height = height + 'px'

        }, 100);
        window.setTimeout(function () {
            window.clearInterval(inter);
        }, 10000);

    }
</script>
<!-- 代码结束 -->
</body>
</html>
